<%--
  Created by IntelliJ IDEA.
  User: XT
  Date: 2022/5/10
  Time: 16:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主界面</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui/css/default.css" />
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="easyui/css/demo.css">
    <script type="text/javascript" src='easyui/js/outlook2.js'> </script>
    <script type="text/javascript" src="easyui/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/themes/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<div class="easyui-layout" style="width:100%;height:100%;">
    <div data-options="region:'west',split:true" title="餐厅后勤管理系统" style="width:150px;">
        <div class="easyui-accordion" data-options="fit:true,border:false">
            <div title="员工管理"  style="padding:10px;">
                <a href="#" class="easyui-linkbutton"  style="width: 100%;display:${yg.bz=="1"?"block":"none"}" onclick="addTab('员工信息','${pageContext.request.contextPath}/YGServlet')">员工信息</a>
            </div>
            <div title="食材管理"  style="padding:10px;">
                <a href="#" class="easyui-linkbutton"  style="width: 100%" onclick="addTab('食材信息','${pageContext.request.contextPath}/SCServlet')">食材信息</a>
            </div>
            <div title="采购管理" style="padding:10px">
                <a href="#" class="easyui-linkbutton"  style="width: 100%" onclick="addTab('采购信息','${pageContext.request.contextPath}/CGServlet')">采购列表</a><br><br>
                <a href="#" class="easyui-linkbutton"  style="width: 100%;display:${yg.bz=="1"?"block":"none"}" onclick="addTab('列表上传','fileupload.jsp')">列表上传</a>
                <a href="#" class="easyui-linkbutton"  style="width: 100%;display:${yg.bz=="2"?"block":"none"}" onclick="addTab('列表下载','${pageContext.request.contextPath}/FileServlet')" >列表下载</a>
            </div>
            <div title="用户管理" style="padding: 10px">
                <a href="#" class="easyui-linkbutton"  style="width: 100%" onclick="addTab('修改密码','xgmm.jsp')">修改密码</a><br><br>
                <a href="${pageContext.request.contextPath}/Logout" style="width: 100%" class="easyui-linkbutton" >退出登录</a>
            </div>

        </div>
    </div>
    <div data-options="region:'center',title:'后台首页'">
        <div class="easyui-tabs" data-options="fit:true,border:false,plain:true" id="tt">
            <div title="首页">

            </div>

        </div>
    </div>
</div>
</body>
<script>
    function addTab(title, url){
        if ($('#tt').tabs('exists', title)){
            $('#tt').tabs('select', title);
        } else {
            var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
            $('#tt').tabs('add',{
                title:title,
                content:content,
                closable:true
            });
        }
    }
</script>
</html>
